package hb.com.player;

import hb.com.common.Direction;
import hb.com.impl.bullet.Weapon;
import android.graphics.Point;



/**
 * This class define common behaviors of the player, and define some abstract
 * behaviors which will be implement in the sub-class
 * @author Pham Hong Hung
 * @version 1.0
 * @created 11-Jun-2012 3:09:21 PM
 */
public abstract class AbsPlayer {

	/**
	 * set the player has gift or not
	 */
	protected boolean _hasGift;
	/**
	 * set the immutable for player
	 */
	protected boolean _immutable;
	/**
	 * set the player is auto or not
	 */
	protected boolean _isAuto;
	protected long cost;
	protected byte group;
	protected int level;
	protected Point position;
	protected float speed;
	protected Weapon weapon;
	public Direction direction;

	public AbsPlayer(){

	}

	public void finalize() throws Throwable {

	}

	/**
	 * return true if the player is destroyed, else return false
	 */
	public boolean destroy(){
		return false;
	}

	/**
	 * return the cost of the player. It will be implement in sub-class.
	 */
	public abstract long getCost();

	/**
	 * return the group of player. There are 2 groups: auto player & player
	 */
	public abstract byte getGroup();

	/**
	 * return the height of the player: All players is the same height
	 */
	public float getHeight(){
		//TODO
		return 0.0f;
	}

	/**
	 * only effect for player ( not for auto-player), for the at time when player is
	 * appear.
	 */
	public abstract boolean getImmutable();

	/**
	 * return the level of the player.
	 * Level 1, when the player is shooted one bullet, it will be died.
	 * Level 2, when the player is shooted two bullets, it will be died.
	 * .....
	 * The player is always level 1 and the auto player, there are some level
	 */
	public abstract short getLevel();

	/**
	 * return the current posittion of the player
	 */
	public Point getPosition(){
		return null;
	}

	/**
	 * return the speed to move of the player.
	 * The real speed of the playeris include this speed add with the friction of the
	 * surface
	 */
	public float getSpeed(){
		//TODO
		return 0.0f;
	}

	/**
	 * return the weapon of the player
	 */
	public Weapon getWeapon(){
		return null;
	}

	/**
	 * return the width of the player. All Players are the same width
	 */
	public float getWidth(){
		//TODO
		return 0.0f;
	}

	/**
	 * return the status of the player.
	 */
	public boolean isAuto(){
		return false;
	}

	/**
	 * return true if player is auto and has gift ( when destroy, it will be show the
	 * gift)
	 */
	public boolean isHasGift(){
		return false;
	}

	/**
	 * if player is auto, will be set the true value
	 * 
	 * @param _isAuto
	 */
	public void setAuto(boolean _isAuto){

	}

	/**
	 * set the image path for loading into the background of the player
	 * 
	 * @param imgPath
	 */
	public abstract void setBackground(String imgPath);

	/**
	 * set cost for player
	 * 
	 * @param cost
	 */
	public void setCost(long cost){

	}

	/**
	 * set group for player
	 * 
	 * @param group
	 */
	public void setGroup(byte group){

	}

	/**
	 * set has gift for player
	 * 
	 * @param hasGift
	 */
	public void setHasGift(boolean hasGift){

	}

	/**
	 * 
	 * @param height
	 */
	public void setHeight(float height){

	}

	/**
	 * set the immutable status for player
	 * 
	 * @param immutable
	 */
	public void setImmutable(boolean immutable){

	}

	/**
	 * set level for player
	 * 
	 * @param level
	 */
	public void setLevel(int level){

	}

	/**
	 * set current position for player
	 * 
	 * @param point
	 */
	public void setPosition(Point position){
		this.position = position;

	}

	/**
	 * set speed for player
	 * 
	 * @param speed
	 */
	public void setSpeed(float speed){

	}

	/**
	 * set weapon for player
	 * 
	 * @param weapon
	 */
	public abstract void setWeapon(Weapon weapon);

	/**
	 * set width for player
	 * 
	 * @param width
	 */
	public void setWidth(float width){

	}

	/**
	 * player will shoot
	 */
	public abstract void shoot();

}